using MagicApp.Data;
using MagicApp.Services;
using System.Collections.Generic;
using System;

namespace MagicApp.Testing
{
    public class DummyGameRepository : IGameRepository
    {
    	private Guid guid;
		public Guid CreateXMLGame()
		{
			this.guid = System.Guid.Empty;
			return guid;
		}
    	
		public void AddPlayersToGame(string gameId, IList<User> players)
		{
			throw new System.NotImplementedException();
		}
    	
		public Game GetGame(string gameId)
		{
			//initialize a stubby deck engine
			GameEngine ge = 
				new GameEngine(new DeckEngine(new DummyCardRepository()),
				               new GameService(new DummyGameRepository()));
			
			//make player entities
			PlayerEntity p1 = new PlayerEntity(new User("ryan"),ge.De.GetDeck("sammys"));
			PlayerEntity p2 = new PlayerEntity(new User("sammy"),ge.De.GetDeck("sammys"));
			PlayerEntity p3 = new PlayerEntity(new User("chase"),ge.De.GetDeck("sammys"));
			
			//Make a list of player entities
			IList<PlayerEntity> players = new List<PlayerEntity>();
			
			//add player entitities
			players.Add(p1);
			players.Add(p2);
			players.Add(p3);
			
			//create and return a game
			
			Game game = new Game("test",guid,players);
			return game;
			
			
		}
		
    }
}
